//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.qst.crop.entity;

import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;

public class PasswordParam {
    @NotBlank
    private String oldPassword;
    @NotBlank
    private @Pattern(
            regexp = "^[a-zA-Z][a-zA-Z0-9_]{5,17}$",
            message = "密码必须以字母开头，长度在6-18之间，只能包含英文字符、数字和下划线"
    ) String newPassword;

    public PasswordParam() {
    }

    public String getOldPassword() {
        return this.oldPassword;
    }

    public String getNewPassword() {
        return this.newPassword;
    }

    public void setOldPassword(final String oldPassword) {
        this.oldPassword = oldPassword;
    }

    public void setNewPassword(final String newPassword) {
        this.newPassword = newPassword;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof PasswordParam)) {
            return false;
        } else {
            PasswordParam other = (PasswordParam)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$oldPassword = this.getOldPassword();
                Object other$oldPassword = other.getOldPassword();
                if (this$oldPassword == null) {
                    if (other$oldPassword != null) {
                        return false;
                    }
                } else if (!this$oldPassword.equals(other$oldPassword)) {
                    return false;
                }

                Object this$newPassword = this.getNewPassword();
                Object other$newPassword = other.getNewPassword();
                if (this$newPassword == null) {
                    if (other$newPassword != null) {
                        return false;
                    }
                } else if (!this$newPassword.equals(other$newPassword)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof PasswordParam;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $oldPassword = this.getOldPassword();
        result = result * 59 + ($oldPassword == null ? 43 : $oldPassword.hashCode());
        Object $newPassword = this.getNewPassword();
        result = result * 59 + ($newPassword == null ? 43 : $newPassword.hashCode());
        return result;
    }

    public String toString() {
        return "PasswordParam(oldPassword=" + this.getOldPassword() + ", newPassword=" + this.getNewPassword() + ")";
    }
}
